﻿@using Microsoft.AspNetCore.Identity
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using OrchardCore.Settings
@using OrchardCore.Users
@using OrchardCore.Users.Models
@using ScriptTagHelper=OrchardCore.ResourceManagement.TagHelpers.ScriptTagHelper
@model OrchardCore.Users.ViewModels.LoginViewModel
@inject SignInManager<IUser> SignInManager
@inject ISiteService SiteService


@{
    ViewLayout = "Layout__Login";
    var userCanRegister = (await SiteService.GetSiteSettingsAsync()).As<RegistrationSettings>().UsersCanRegister == UserRegistrationType.AllowRegistration;
    var allowResetPassword = (await SiteService.GetSiteSettingsAsync()).As<ResetPasswordSettings>().AllowResetPassword;
    var loginProviders = (await SignInManager.GetExternalAuthenticationSchemesAsync()).ToList();
    var disableLocalLogin = (await SiteService.GetSiteSettingsAsync()).As<LoginSettings>().DisableLocalLogin;
    var themeBaseUrl = Href("~/EasyOCVbenAdminTheme");

}
<div class="flex w-full h-full py-5 xl:h-auto xl:py-0 xl:my-0 xl:w-6/12">
    <div class="vben-login-form relative w-full px-5 py-8 mx-auto my-auto rounded-md shadow-md xl:ml-16 xl:bg-transparent sm:px-8 xl:p-4 xl:shadow-none sm:w-3/4 lg:w-2/4 xl:w-auto enter-x">
        <div id="login">

            <h2 class="mb-3 text-2xl font-bold text-center xl:text-3xl enter-x xl:text-left enter-x">登录</h2>
            <form class="ant-form ant-form-horizontal p-4 enter-x"
                  asp-controller="Account" asp-action="Login"
                  asp-route-returnurl="@ViewData["ReturnUrl"]" method="post">
                <div class="ant-row ant-form-item enter-x" style="row-gap: 0px;">
                    <!---->
                    <div class="ant-col ant-form-item-control">
                        <div class="ant-form-item-control-input">
                            <div class="ant-form-item-control-input-content">
                                <input placeholder="账号" asp-for="UserName"
                                       class="ant-input ant-input-lg fix-auto-fill" autofocus tabindex="1" />
                                @* <input placeholder="账号" type="text" *@
                                @*        class="ant-input ant-input-lg fix-auto-fill" id="account"> *@

                                <span asp-validation-for="UserName"
                                      class="ant-form-item-explain ant-form-item-explain-error">
                                </span>
                            </div>
                            <!---->
                        </div>
                        <!---->
                        <!---->
                    </div>
                </div>
                <div class="ant-row ant-form-item enter-x" style="row-gap: 0px;">
                    <!---->
                    <div class="ant-col ant-form-item-control">
                        <div class="ant-form-item-control-input">
                            <div class="ant-form-item-control-input-content">
                                <span class="ant-input-password ant-input-password-large ant-input-affix-wrapper ant-input-affix-wrapper-lg">
                                    <!---->
                                    <input asp-for="Password" placeholder="密码" type="password" tabindex="2"
                                           class="ant-input ant-input-lg  fix-auto-fill">
                                    <span class="ant-input-suffix" id="togglePassword">
                                        <!---->
                                        <span role="img" aria-label="eye-invisible" tabindex="-1"
                                              class="anticon anticon-eye-invisible ant-input-password-icon">
                                            <svg focusable="false"
                                                 class="" data-icon="eye-invisible" width="1em" height="1em" fill="currentColor"
                                                 aria-hidden="true" viewBox="64 64 896 896">

                                                <path id="path-eye" d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path>
                                                <path id="path-eye-invisible-1"
                                                      d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z">
                                                </path>
                                                <path id="path-eye-invisible-2"
                                                      d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z">
                                                </path>
                                            </svg>
                                        </span>
                                    </span>
                                </span>
                                <span asp-validation-for="Password"
                                      class="ant-form-item-explain ant-form-item-explain-error">
                                </span>

                            </div>
                            <!---->
                        </div>
                        <!---->
                        <!---->
                    </div>
                </div>
                <div class="ant-row enter-x" style="row-gap: 0px;">

                    <div class="ant-col ant-col-12">
                        <div class="ant-row ant-form-item" style="row-gap: 0px;">
                            <!---->
                            <div class="ant-col ant-form-item-control" id="rememberMe">
                                <div class="ant-form-item-control-input">
                                    <div class="ant-form-item-control-input-content">
                                        <label class="ant-checkbox-wrapper">
                                            <span class="ant-checkbox">
                                                <input asp-for="RememberMe" type="checkbox" class="ant-checkbox-input">
                                                <span class="ant-checkbox-inner">
                                                </span>
                                            </span><label style="margin-left: 5px;" asp-for="RememberMe">@T["Remember me"]</label>
                                        </label>
                                    </div>
                                    <!---->
                                </div>
                                <!---->
                                <!---->
                            </div>
                        </div>
                    </div>
                    @if (allowResetPassword)
                    {
                        <div class="ant-col ant-col-12">
                            <div class="ant-row ant-form-item" style="text-align: right; row-gap: 0px;">
                                <!---->
                                <div class="ant-col ant-form-item-control">
                                    <div class="ant-form-item-control-input">
                                        <div class="ant-form-item-control-input-content">
                                            <a asp-controller="ResetPassword" asp-action="ForgotPassword"
                                           class="ant-btn ant-btn-link ant-btn-sm" type="button">
                                                <!----><span>@T["Forgot your password?"]</span>
                                            </a>
                                        </div>
                                        <!---->
                                    </div>
                                    <!---->
                                    <!---->
                                </div>
                            </div>
                        </div>
                    }

                </div>
                <div asp-validation-summary="All"></div>
                <div class="ant-row ant-form-item enter-x" style="row-gap: 0px;">
                    <!---->
                    <div class="ant-col ant-form-item-control">
                        <div class="ant-form-item-control-input">
                            <div class="ant-form-item-control-input-content">
                                <button type="submit"
                                        class="ant-btn ant-btn-primary ant-btn-lg ant-btn-block" type="button">
                                    <!----><span>登 录</span>
                                </button>
                            </div>
                            <!---->
                        </div>
                        <!---->
                        <!---->
                    </div>
                </div>
                <div class="ant-row enter-x" style="row-gap: 0px;">
                    <div class="ant-col ant-col-xs-24 ant-col-md-8">
                        <button disabled="disabled" class="ant-btn ant-btn-block" type="button">
                            <!----><span>手机登录</span>
                        </button>
                    </div>
                    <div class="ant-col ant-col-xs-24 ant-col-md-8 !my-2 !md:my-0 xs:mx-0 md:mx-2">
                        <button disabled="disabled"
                                class="ant-btn ant-btn-block" type="button">
                            <!----><span>二维码登录</span>
                        </button>
                    </div>
                    @if (userCanRegister)
                    {
                        <div class="ant-col ant-col-xs-24 ant-col-md-7">
                            <a asp-controller="Registration" asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" class="ant-btn ant-btn-block" type="button">
                                <!----><span>注 册</span>
                            </a>
                        </div>
                    }
                </div>
            </form>
            <div class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-center enter-x"
                 role="separator">
                <span class="ant-divider-inner-text">其他登录方式</span>
            </div>
            @if (loginProviders.Count > 0)
            {
                <div class="flex justify-evenly enter-x vben-login-sign-in-way">

                    <form asp-controller="Account" asp-action="ExternalLogin" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post">
                        @foreach (var provider in loginProviders)
                        {

                            @if (provider.Name == "Wechat")
                            {
                                <button name="provider" value="@provider.Name" title="@T["Log in using your {0} account", provider.DisplayName]" type="submit" role="img" aria-label="wechat" class="anticon anticon-wechat">
                                    <svg focusable="false" class="" data-icon="wechat" width="1em" height="1em" fill="currentColor"
                             aria-hidden="true" viewBox="64 64 896 896">
                                        <path d="M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z">
                                        </path>
                                    </svg>
                                </button>
                            }
                            @*  <span role="img" aria-label="github"
                    class="anticon anticon-github">
                    <svg focusable="false" class="" data-icon="github" width="1em"
                    height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896">
                    <path
                    d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z">
                    </path>
                    </svg>
                    </span>
                    <span role="img" aria-label="alipay-circle" class="anticon anticon-alipay-circle">
                    <svg
                    focusable="false" class="" data-icon="alipay-circle" width="1em" height="1em" fill="currentColor"
                    aria-hidden="true" viewBox="64 64 896 896">
                    <path
                    d="M308.6 545.7c-19.8 2-57.1 10.7-77.4 28.6-61 53-24.5 150 99 150 71.8 0 143.5-45.7 199.8-119-80.2-38.9-148.1-66.8-221.4-59.6zm460.5 67c100.1 33.4 154.7 43 166.7 44.8A445.9 445.9 0 00960 512c0-247.4-200.6-448-448-448S64 264.6 64 512s200.6 448 448 448c155.9 0 293.2-79.7 373.5-200.5-75.6-29.8-213.6-85-286.8-120.1-69.9 85.7-160.1 137.8-253.7 137.8-158.4 0-212.1-138.1-137.2-229 16.3-19.8 44.2-38.7 87.3-49.4 67.5-16.5 175 10.3 275.7 43.4 18.1-33.3 33.4-69.9 44.7-108.9H305.1V402h160v-56.2H271.3v-31.3h193.8v-80.1s0-13.5 13.7-13.5H557v93.6h191.7v31.3H557.1V402h156.4c-15 61.1-37.7 117.4-66.2 166.8 47.5 17.1 90.1 33.3 121.8 43.9z">
                    </path>
                    </svg>
                    </span>
                    <span role="img" aria-label="google-circle" class="anticon anticon-google-circle">
                    <svg
                    focusable="false" class="" data-icon="google-circle" width="1em" height="1em" fill="currentColor"
                    aria-hidden="true" viewBox="64 64 896 896">
                    <path
                    d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm167 633.6C638.4 735 583 757 516.9 757c-95.7 0-178.5-54.9-218.8-134.9C281.5 589 272 551.6 272 512s9.5-77 26.1-110.1c40.3-80.1 123.1-135 218.8-135 66 0 121.4 24.3 163.9 63.8L610.6 401c-25.4-24.3-57.7-36.6-93.6-36.6-63.8 0-117.8 43.1-137.1 101-4.9 14.7-7.7 30.4-7.7 46.6s2.8 31.9 7.7 46.6c19.3 57.9 73.3 101 137 101 33 0 61-8.7 82.9-23.4 26-17.4 43.2-43.3 48.9-74H516.9v-94.8h230.7c2.9 16.1 4.4 32.8 4.4 50.1 0 74.7-26.7 137.4-73 180.1z">
                    </path>
                    </svg>
                    </span>
                    <span role="img" aria-label="twitter-circle"
                    class="anticon anticon-twitter-circle">
                    <svg focusable="false" class="" data-icon="twitter-circle"
                    width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896">
                    <path
                    d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm215.3 337.7c.3 4.7.3 9.6.3 14.4 0 146.8-111.8 315.9-316.1 315.9-63 0-121.4-18.3-170.6-49.8 9 1 17.6 1.4 26.8 1.4 52 0 99.8-17.6 137.9-47.4-48.8-1-89.8-33-103.8-77 17.1 2.5 32.5 2.5 50.1-2a111 111 0 01-88.9-109v-1.4c14.7 8.3 32 13.4 50.1 14.1a111.13 111.13 0 01-49.5-92.4c0-20.7 5.4-39.6 15.1-56a315.28 315.28 0 00229 116.1C492 353.1 548.4 292 616.2 292c32 0 60.8 13.4 81.1 35 25.1-4.7 49.1-14.1 70.5-26.7-8.3 25.7-25.7 47.4-48.8 61.1 22.4-2.4 44-8.6 64-17.3-15.1 22.2-34 41.9-55.7 57.6z">
                    </path>
                    </svg>
                    </span>*@
                        }

                    </form>
                </div>
            }
        </div>

    </div>
</div>


<script at="Foot">



</script>
